import request from '@/utils/request';

//查询材料目录元素列表
export function page(query) {
  return request({
    url: process.env.VUE_APP_KSTB_ROUTE_PATH + '/materialCatalogElement/queryMaterialCatalogElementWithPage',
    method: 'post',
    params: query
  })
}





// 获取一条材料目录和目录子项详情
export function getOne(id) {
  return request({
    url: process.env.VUE_APP_KSTB_ROUTE_PATH + '/materialCatalogElement/getone',
    params: {
      id: id
    },
    method: 'post',
  })
}


// 材料目录和目录子项新增或者修改
export function saveOrUpdate(data) {
  return request({
    url: process.env.VUE_APP_KSTB_ROUTE_PATH + '/materialCatalogElement/saveOrUpdate',
    method: 'post',
    data: data
  })
}


// 删除材料目录和目录子项信息
export function del(id) {
  return request({
    url: process.env.VUE_APP_KSTB_ROUTE_PATH + '/materialCatalogElement/delete',
    params: {
      id: id
    },
    method: 'post'
  })
}

//materialCatalogElement
export function checkIsRelation(id) {
  return request({
    url: process.env.VUE_APP_KSTB_ROUTE_PATH + '/materialCatalogElement/checkIsRelation?materialCatalogElementOid=' + id,
    method: 'get'
  })
}

